//
//  Commtools.h
//  PudiEdu
//
//  Created by cong on 15/2/23.
//  Copyright (c) 2015 cong. All rights reserved.
//  工具类，公共类，把常用的方法放在这里



#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
//@class JGProgressHUD;
#import "JSONKit.h"
@interface Commtools : NSObject


//+ (JGProgressHUD *)getShareHud;

+ (void)showShortToast:(UIView *)view andString:(NSString *)msg;

+ (void)showProgress:(UIView *)view;

+ (void)showProgressCancle:(UIView *)view;

+ (void)dismissProgress;

//- (void)showOldShortToast:(UIView *)view andString:(NSString *)msg;
+ (void)showProgress:(UIView *)view andString:(NSString *)msg;

//+ (JGProgressHUD *)showPie2HUD:(UIView *)view;

+ (void)showPieHUD:(UIView *)view;

//+ (void)incrementHUD:(JGProgressHUD *)HUD progress:(int)progress;

+ (NSString *)getCurrentData;

+ (NSString *)getCurrentDataUpdateImg;

+ (NSString *)md5:(NSString *)str;

- (NSString *)md5:(NSString *)str;

+ (CGFloat)labelAutoCalculateRectWith:(NSString*)text FontSize:(CGFloat)fontSize MaxSize:(CGSize)maxSize;

+ (void)setExtraCellLineHidden: (UITableView *)tableView;

+ (void)showMessage:(NSString *)message;

+ (UIImage *) createImageWithColor: (UIColor *) color;

+(UINavigationController *)getSelectedNavi:(UIViewController *)vc byRect:(CGRect)frame;

+(UIViewController *)getSelected :(UIViewController *)vc byRect:(CGRect)frame;

@property(nonatomic)BOOL keyboardIsVisible;

+ (Commtools *)sharedCommtools;

+(NSAttributedString * )attributedStringFromString:(NSString * )string;

+ (CGSize)getStringaString:(NSString*)aString andWidth:(CGFloat  )width;

+(BOOL)isKongGe:(NSString *)string;


+(void)isEixtEdit:(UIViewController*)VC;

+(UIImage *)rotateImage:(UIImage *)aImage;
+ (UITableView *)tableView:(UIView *)view;

+(BOOL)isDaytime;
//四舍五入
+ (NSString *) decimalwithFormat:(NSString *)format  floatV:(float)floatV;

//转化成json
+(NSString *)toJsonStringFrom:(id)theData;
@end
